/*
 * XML Type:  inheritance
 * Namespace: http://java.sun.com/xml/ns/persistence/orm
 * Java type: com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Inheritance
 *
 * Automatically generated - do not modify.
 */
package com.googlecode.horncomb.orm.jpa.v10.xmlbeans.impl;
/**
 * An XML inheritance(@http://java.sun.com/xml/ns/persistence/orm).
 *
 * This is a complex type.
 */
public class InheritanceImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.googlecode.horncomb.orm.jpa.v10.xmlbeans.Inheritance
{
    
    /**  */
	private static final long serialVersionUID = 2786204953499196679L;


	public InheritanceImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName STRATEGY$0 = 
        new javax.xml.namespace.QName("", "strategy");
    
    
    /**
     * Gets the "strategy" attribute
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.InheritanceType.Enum getStrategy()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STRATEGY$0);
            if (target == null)
            {
                return null;
            }
            return (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.InheritanceType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "strategy" attribute
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.InheritanceType xgetStrategy()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.InheritanceType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.InheritanceType)get_store().find_attribute_user(STRATEGY$0);
            return target;
        }
    }
    
    /**
     * True if has "strategy" attribute
     */
    public boolean isSetStrategy()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(STRATEGY$0) != null;
        }
    }
    
    /**
     * Sets the "strategy" attribute
     */
    public void setStrategy(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.InheritanceType.Enum strategy)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STRATEGY$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(STRATEGY$0);
            }
            target.setEnumValue(strategy);
        }
    }
    
    /**
     * Sets (as xml) the "strategy" attribute
     */
    public void xsetStrategy(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.InheritanceType strategy)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.InheritanceType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.InheritanceType)get_store().find_attribute_user(STRATEGY$0);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.InheritanceType)get_store().add_attribute_user(STRATEGY$0);
            }
            target.set(strategy);
        }
    }
    
    /**
     * Unsets the "strategy" attribute
     */
    public void unsetStrategy()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(STRATEGY$0);
        }
    }
}
